Skip to content

Fix crash when user has 20+ direct conversations#192

Open
ESH13 wants to merge 1 commit intobasecamp:mainfrom
ESH13:fix-negative-limit-direct-placeholders
Open

Fix crash when user has 20+ direct conversations#192
ESH13 wants to merge 1 commit intobasecamp:mainfrom
ESH13:fix-negative-limit-direct-placeholders

Conversation

@ESH13
Copy link
Copy Markdown

@ESH13 ESH13 commented Apr 10, 2026

Problem

find_direct_placeholder_users in Users::SidebarsController passes a negative value to .limit() when a user has direct rooms with 20 or more unique participants. PostgreSQL raises LIMIT must not be negative, crashing the sidebar controller. Since the sidebar is loaded via a Turbo Frame on every page, this makes the entire application unusable for that user — "Content missing" on every page, every browser, every device.

Fix

Clamp the limit to a minimum of zero so limit(0) returns an empty result set instead of raising. One-line change.

See #191

Copilot AI review requested due to automatic review settings April 10, 2026 13:38
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant